var arr = [undefined, "23year", 19, "097", 1, "hello", null, 1];
function getSum(arr) {
    var num = [];
    var sum = 0;
    for (var _i = 0, arr_1 = arr; _i < arr_1.length; _i++) {
        var item = arr_1[_i];
        if (typeof item === 'number' && num.indexOf(item) == -1) {
            num.push(item);
            sum += item;
        }
    }
    return sum;
}
console.log(getSum(arr));
